from flask import Flask
from app import create_app
from flask_script import Manager
from flask_migrate import Migrate,MigrateCommand
from app.models import db
from app.views.finance import finance
from app.views.student import student
from app.views.studentInfo import stuinfo
from app.views.employment import employment
from app.views.statistics import statistics
from app.views.work import work
from app.views.School import school0
from app.views.EduGet import eduget0
from app.views.EduOff import eduOff
from app.views.Enterprise import enterprise0
from app.views.Phone_Up import phone_up0
from app.views.Procurement import procurement0
from app.views.School_Income import school_income0
from app.views.School_Expend import school_expend0
app =create_app("default")
db.init_app(app)

finance.init_app(app)
student.init_app(app)
stuinfo.init_app(app)
work.init_app(app)
employment.init_app(app)
statistics.init_app(app)
procurement0.init_app(app)
# EduGet.init_app(app)
# api.init_app(app)

phone_up0.init_app(app)
enterprise0.init_app(app)
eduOff.init_app(app)
school0.init_app(app)
eduget0.init_app(app)
school_income0.init_app(app)
school_expend0.init_app(app)
manage = Manager(app)
mirate=Migrate(app,db)
manage.add_command("db", MigrateCommand)

if __name__ == "__main__":
    manage.run()